
///////////////////////////////////////////////////////////////////////////////
//
// SIMPLESTRING.H
//
// One of the design goals of CppUnitLite is to compilation with very old C++
// compilers.  For that reason, I've added a simple string class that provides
// only the operations needed in CppUnitLite.
//
///////////////////////////////////////////////////////////////////////////////

#ifndef SIMPLE_STRING
#define SIMPLE_STRING

#if 0
#include <string>
#endif

class SimpleString
{
    friend bool    operator== (const SimpleString& left, const SimpleString& right);

public:
                        SimpleString ();
                        SimpleString (const char *value);
                        SimpleString (const SimpleString& other);
                        ~SimpleString ();

    SimpleString        operator= (const SimpleString& other);

    char                *asCharString () const;
    int                    size() const;

private:
    char                *buffer;
};



SimpleString StringFrom (bool value);
SimpleString StringFrom (const char *value);
SimpleString StringFrom (int value);
SimpleString StringFrom (unsigned value);
SimpleString StringFrom (long value);
SimpleString StringFrom (long long value);
SimpleString StringFrom (double value);
#if 0
SimpleString StringFrom(const std::string& value);
#endif
SimpleString StringFrom (const SimpleString& other);


#endif
